import request from '@/utils/request'

export function queryGroupPage(query) {
    return request({
        url: '/gateway/permissionGroup/page',
        method: 'get',
        params: query
    })
}

export function createGroup(data) {
    return request({
        url: '/gateway/permissionGroup/create',
        method: 'post',
        data: data
    })
}

export function updateGroup(data) {
    return request({
        url: '/gateway/permissionGroup/update',
        method: 'put',
        data: data
    })
}

export function delGroup(query) {
    return request({
        url: '/gateway/permissionGroup/del',
        method: 'delete',
        params: query
    })
}


export function queryGroupApiPage(query) {
    return request({
        url: '/permissionGroup/api/page',
        method: 'get',
        params: query
    })
}


export function bindApiPermission(data) {
    return request({
        url: '/permissionGroup/bindApiPermission',
        method: 'post',
        data: data
    })
}

export function queryPermissionType() {
    return request({
        url: '/permissionGroup/permissionType/list',
        method: 'get',
    })
}

export function delGroupApi(query) {
    return request({
        url: '/permissionGroup/api/del',
        method: 'delete',
        params: query
    })
}
